package com.example.community.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @Author: huang
 * @Date: 2021/10/9 13:56
 * @Description:
 */
@Service
public class AlphaService {

    private final static Logger logger = LoggerFactory.getLogger(AlphaService.class);

    //让该方法在多线程环境下，被异步的调用
    @Async
    public void execute1(){
        logger.debug("execute1");
    }

    //@Scheduled(initialDelay = 10000,fixedRate = 1000)
    public void execute2(){
        logger.debug("execute2");
    }


}
